<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-playRules-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">玩法类型</label>
                <div class="col-sm-8">
                    <select id="type" name="type" class="form-control m-b"
                            th:with="type=${@dict.getType('wan_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">玩法说明：</label>
                <div class="col-sm-8">
                    <div class="editor-wp">
                        <textarea class="editor-area" id="editor-area"></textarea>
                        <input type="hidden" id="description" name="description" value=""/>
                    </div>
                </div>
            </div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <div th:include="tool/upload/webuploader :: webuploader"></div>
    <script th:src="@{/ajax/libs/select/select2.js}"></script>
    <!--富文本编辑器-->
    <script src="../../../static/tinymce/tinymce.min.js" th:src="@{/tinymce/tinymce.min.js}"></script>
    <script src="../../../static/tinymce/tinymce.common.js" th:src="@{/tinymce/tinymce.common.js}"></script>
    <script type="text/javascript">
		var prefix = ctx + "module/playRules"
		$("#form-playRules-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
                $("#description").val(tinymce.activeEditor.getContent());
	            $.operate.save(prefix + "/add", $('#form-playRules-add').serialize());
	        }
	    }
	</script>
</body>
</html>
